/* Copyright (c) 2024 Huawei Technologies Co., Ltd.
openFuyao is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
         http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN 'AS IS' BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details. */
const computingPowerEngineFilled = (theme) => (
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 20 20"><defs>
    <style>.cls-1{{ fill: 'none' }}.cls-2{{ fill: 'url(#未命名的渐变_2)' }}.cls-3{{ fill: 'url(#未命名的渐变_2-2)' }}</style>
    <linearGradient id="未命名的渐变_2" x1="-486.21" y1="897.49" x2="-486.21" y2="896.49" gradientTransform="matrix(20, 0, 0, -18, 9734.32, 16155.77)" gradientUnits="userSpaceOnUse">
      <stop offset="0" stop-color="#477dd8" />
      <stop offset="1" stop-color="#234c9e" />
    </linearGradient>
    <linearGradient id="未命名的渐变_2-2" x1="-469.87" y1="954.23" x2="-469.87" y2="953.23" gradientTransform="matrix(4.91, 4.91, 4.91, -4.91, -2367.86, 7009.54)" xlink:href="#未命名的渐变_2" /></defs>
    <g id="图层_2" data-name="图层 2">
      <g id="图层_1-2" data-name="图层 1">
        <g id="算力引擎-选中">
          <rect id="矩形_831" data-name="矩形 831" className="cls-1" fill="none" width="20" height="20" />
          <path id="减去_74" data-name="减去 74" className="cls-2" fill={`${theme === 'light' ? 'url(#未命名的渐变_2)' : 'white'}`} d="M8.46,19H4a10,10,0,1,1,16-8,9.91,9.91,0,0,1-4,8H11.54l2.59-3.6a1,1,0,0,0,.1-1L10.91,7.15A1,1,0,0,0,10,6.57a1,1,0,0,0-.9.58L5.79,14.39a1,1,0,0,0,.09,1L8.47,19Zm8.3-7.5a1,1,0,1,0,0,2h1a1,1,0,0,0,0-2Zm-14.53,0a1,1,0,0,0,0,2h1a1,1,0,1,0,0-2ZM16.12,5.42a1,1,0,0,0-.71.29l-.71.7a1.05,1.05,0,0,0-.29.71,1,1,0,0,0,.29.71,1,1,0,0,0,1.42,0l.71-.71a1,1,0,0,0,.29-.71,1,1,0,0,0-.29-.7,1,1,0,0,0-.71-.29Zm-12.48,0a.93.93,0,0,0-.7.29,1,1,0,0,0-.3.7,1,1,0,0,0,.3.71l.7.71a1,1,0,0,0,1.42,0,1,1,0,0,0,.29-.71,1.05,1.05,0,0,0-.29-.71l-.71-.7a1,1,0,0,0-.7-.29ZM10,2A1,1,0,0,0,9,3V4a1,1,0,0,0,2,0V3A1,1,0,0,0,10,2Z" />
          <path id="路径_249_-_轮廓" data-name="路径 249 - 轮廓" className="cls-3" fill={`${theme === 'light' ? 'url(#未命名的渐变_2-2)' : 'white'}`} d="M10.59,9.17a.78.78,0,0,1,.16.24L12.85,14a.85.85,0,0,1-.08.83l-2.1,2.92a.83.83,0,0,1-1.15.19.86.86,0,0,1-.19-.19L7.24,14.81A.8.8,0,0,1,7.16,14L9.25,9.41A.84.84,0,0,1,10,8.93.87.87,0,0,1,10.59,9.17Z" /></g></g></g>
  </svg>
);

const computingPowerEngineOutlined = (theme) => (
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
    <defs>
      <style>.cls-1,.cls-3,.cls-4{{ fill: 'none' }}.cls-2{{ fill: '#89939b' }}.cls-3,.cls-4{{ stroke: '#89939b' }}</style>
    </defs>
    <g id="图层_2" data-name="图层 2">
      <g id="图层_1-2" data-name="图层 1">
        <g id="算力引擎-正常">
          <rect id="矩形_831" data-name="矩形 831" className="cls-1" fill='none' width="20" height="20" />
          <path id="联合_184" data-name="联合 184" fill='#89939b' d="M14,19a1,1,0,0,1,0-2h1.29A8,8,0,1,0,4.71,17H6a1,1,0,0,1,0,2H4.34a1,1,0,0,1-.62-.22,10,10,0,1,1,12.59,0,1,1,0,0,1-.66.25Z" />
          <g id="路径_248" data-name="路径 248">
            <path className="cls-2" fill='#89939b' d="M10,19h0a1,1,0,0,1-.81-.42L6.65,15.08a1,1,0,0,1-.09-1L9.09,8.55a1,1,0,0,1,1.82,0l2.54,5.53a1,1,0,0,1-.1,1l-2.54,3.54A1,1,0,0,1,10,19ZM8.62,14.39,10,16.32l1.38-1.93-1.38-3Z" /></g>
          <path className="cls-3" fill='none' stroke='#89939b' d="M10,2.5h0a.5.5,0,0,1,.5.5V4a.5.5,0,0,1-.5.5h0A.5.5,0,0,1,9.5,4V3A.5.5,0,0,1,10,2.5Z" />
          <path className="cls-3" fill='none' stroke='#89939b' d="M1.73,12.5h0a.5.5,0,0,1,.5-.5h1a.5.5,0,0,1,.5.5h0a.5.5,0,0,1-.5.5h-1A.5.5,0,0,1,1.73,12.5Z" />
          <path className="cls-3" fill='none' stroke='#89939b' d="M16.27,12.5h0a.5.5,0,0,1,.5-.5h1a.5.5,0,0,1,.5.5h0a.5.5,0,0,1-.5.5h-1A.5.5,0,0,1,16.27,12.5Z" />
          <path className="cls-4" fill='none' stroke='#89939b' d="M3.29,6.06h0a.51.51,0,0,1,.71,0l.71.71a.5.5,0,0,1,0,.7h0a.5.5,0,0,1-.71,0l-.71-.7A.51.51,0,0,1,3.29,6.06Z" />
          <path className="cls-4" fill='none' stroke='#89939b' d="M16.47,6.06h0a.5.5,0,0,1,0,.71l-.7.7a.5.5,0,0,1-.71,0h0a.5.5,0,0,1,0-.7l.71-.71A.5.5,0,0,1,16.47,6.06Z" />
        </g></g></g>
  </svg>
);

export default function ComputingPowerEngineIcon(selected, theme) {
  return (
    <div className="menu-icon">
      {selected ? computingPowerEngineFilled(theme) : computingPowerEngineOutlined(theme)}
    </div>
  );
}